<?php

namespace App\Params\Backend;

use App\Params\Param;
/**
 * 资源修改参数
 *
 * @author: WangBin
 * @date: 2021/7/26
 * @mail: <849850352@qq.com>
 */
class ResourceUpdateParam extends Param
{
    public $resource_id = 0;
    public $resource_name;
    public $resource_code;
    public $is_active = 1;
    public $sort_num;
    public $menu_id;
    public $intro;

    public function rules()
    {
        return [
            'resource_id' => 'nullable|integer',
            'resource_name' => 'required|string',
            'resource_code' => 'required|string',
            'is_active' => 'boolean',
            'sort_num' => 'integer',
            'menu_id' => 'integer',
            'intro' => 'nullable|string'
        ];
    }

    /**
     * @return mixed
     */
    public function getResourceCode()
    {
        return $this->resource_code;
    }

    /**
     * @param mixed $resource_code
     */
    public function setResourceCode($resource_code): void
    {
        $this->resource_code = $resource_code;
    }

    /**
     * @return mixed
     */
    public function getIntro()
    {
        return $this->intro;
    }

    /**
     * @param mixed $intro
     */
    public function setIntro($intro): void
    {
        $this->intro = $intro;
    }

    /**
     * @return mixed
     */
    public function getResourceId()
    {
        return $this->resource_id;
    }

    /**
     * @param mixed $resource_id
     */
    public function setResourceId($resource_id): void
    {
        $this->resource_id = $resource_id;
    }

    /**
     * @return mixed
     */
    public function getResourceName()
    {
        return $this->resource_name;
    }

    /**
     * @param mixed $resource_name
     */
    public function setResourceName($resource_name): void
    {
        $this->resource_name = $resource_name;
    }

    /**
     * @return int
     */
    public function getIsActive(): int
    {
        return $this->is_active;
    }

    /**
     * @param int $is_active
     */
    public function setIsActive(int $is_active): void
    {
        $this->is_active = $is_active;
    }

    /**
     * @return mixed
     */
    public function getSortNum()
    {
        return $this->sort_num;
    }

    /**
     * @param mixed $sort_num
     */
    public function setSortNum($sort_num): void
    {
        $this->sort_num = $sort_num;
    }

    /**
     * @return mixed
     */
    public function getMenuId()
    {
        return $this->menu_id;
    }

    /**
     * @param mixed $menu_id
     */
    public function setMenuId($menu_id): void
    {
        $this->menu_id = $menu_id;
    }
}
